﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Threading;
using Core.Alphabet;
using Core;

namespace Alphabet
{
    public partial class Form1 : Form
    {
		public Form1()
        {
            InitializeComponent();
        }

		Operator op = new Operator();

		private void Form1_Load(object sender, EventArgs e)
		{
			AppConfig.LoadConfiguration();

			ResetCulture();
		}

		private void button1_Click(object sender, EventArgs e)
		{
			label1.Text = op.GetValue();
			AppConfig.AppSettings.EnableLegs = !AppConfig.AppSettings.EnableLegs;
			label2.Text = op.GetValue();
			AppConfig.AppSettings.EnableLegs = !AppConfig.AppSettings.EnableLegs;

			lblLeftHands.Text = op.leftHands.ToString();
			lblRightHands.Text = op.rightHands.ToString();
			lblBothHands.Text = op.both.ToString();
			lblLeftLegs.Text = op.leftLegs.ToString();
			lblRightLegs.Text = op.rightLegs.ToString();
		}

		private void button2_Click(object sender, EventArgs e)
		{
			if (AppConfig.AppSettings.Language == "en-US")
				AppConfig.AppSettings.Language = "ru-RU";
			else
				AppConfig.AppSettings.Language = "en-US";
			Thread.CurrentThread.CurrentCulture = AppConfig.AppSettings.SpecificCulture;
			Thread.CurrentThread.CurrentUICulture = AppConfig.AppSettings.Culture;

			ResetCulture();
			op.ReloadResources();
		}

		private void ResetCulture()
		{
		}

		private void button3_Click(object sender, EventArgs e)
		{
			AlphaForm form = new AlphaForm();
			form.Show();

		}
    }
}
